Dynomotion

Group: DynoMotion Message: 4080 From: soyuzpilot Date: 2/24/2012
Subject: Homing and Mach3 limits
I'm trying to configure homing switches and soft limits in Mach3 with my KFLop board and while I've found bits and pieces of information I can't find a definitive post that describes how the KFlop interacts with Mach3 in this regard. Here is what I've tried and the results I'm getting:

1) I've configured the "Home Program" in the Mach3 Plugin config to be HomeMach3.c which appears to just be an empty shell. It contains a printf statement at the beginning that is supposed to display the parameters that were passed however when I press "Ref All Home" in Mach3 I don't ever see that printed to the console. So I'm not sure if I'm missing something there or not.


2) I've configured I/O bit 3 (JP7, pin 10) to the board's 5V supply via an NC switch to drive it high. When the switch is opened a 1K pull down resistor connected to the board's digital ground drives it low. I've configured port 1, pin3 as the Home switch in Mach3 with Low as Active and can watch the bit being toggled in the Mach3 diagnostics screen.


3) I've configured the axis with positive limit monitoring, stop when low, bit 3, and do not allow motor to drive into switch. When I jog the axis in the negative motion (away from the switch) everything is fine. When I jog in the positive motion (towards the switch) it frequently stops and Mach3 goes into reset mode with the alert message that the Y axis as been disabled. When I reset it will behave the same way again (unrestricted negative movement, random stops with positive movement.) The diagnostics panel does not show the bit blinking low at all during this. Sometimes I can move it an inch or more, sometimes only a few thousandths before it resets again. I have tried exchanging the 1K pulldown resistor for a 3.3k resistor to no effect. I don't know if the problem is the TTL is unstable or something else. If it is likely the TTL, would driving it high with a pull-up and then using the switches to sink to ground be a better solution? My knowledge of TTL circuit design is extremely limited so I really don't know what is standard practice, I'm sort of making it up as I go along.


4) I have tried configuring my Mach3 softlimits but it does not seem to be enabled, despite the green icon on the main screen showing softlimits enabled. Choosing table view does not show a red table extents rectangle. Do these soft limits only work once I have successfully configured the KFlop's homing program? Does the KFLOP have it's own soft limits that I should configure?

My end goal is to have the NC switches in series connected to a single bit on the KFLOP to act as homing for all 3 axis and then use soft limits to keep the table within the extents. However I simply am not clear which tasks I should be looking to configure directly on the KFLOP and which tasks Mach3 will handle. Nor which aspects of Mach3 the KFLOP plugin has rendered moot or silently altered. This seems like such a basic and common task, I am at a loss as to why I've had such difficulty finding specific information on how to make it work. Can someone please clue me in or point me in a direction where I might obtain one?
Group: DynoMotion Message: 4082 From: Tom Kerekes Date: 2/25/2012
Subject: Re: Homing and Mach3 limits
Hi Shawn,
 
Basically all real-time activities (Step Generation, Homing, Limits, etc..) are handled by KFLOP and are configured within KFLOP.  It is best to get everything working in KMotion.exe/KFLOP before even trying to run Mach3 or KMotionCNC.
 
Regarding:
 
#1 - Yes HomeMach3 is just an empty shell to verify Mach3 is properly sending messages.   If Home input switches are configured within Mach3 then it doesn't send Home messages to the Plugin for some reason.  Remove/disable those and see if you get the messages.
 
#2 - The KFLOP inputs are LVTTL 3.3V inputs which are diode clamped to the 3.3V rail.  The protection diodes prevent the input from going above ~ 3.9V.  Some of the inputs are designated +5V  tolerant and have a series resistor to prevent damage if switched to +5V.  But this should be avoided if possible.  Most +5V TTL outputs are only required to go above 2.8V and rarely drive above 3.9V.  So hard switching the inputs directly to +5V should be avoided if possible.  It would be better to use the 1Kohm as a pull up and use the switch to drive the signal low.  The polarity of the signal can be set in software to be either active high or low so that doesn't matter.
 
Noise is often a problem on home and limit inputs.  KFLOP inputs are very fast (sub-microsecond) and KFLOP monitors them thousands of times per second so tiny noise pulses picked up from long cables can be a problem.  The best solution is usually to add a 0.1uF ceramic capacitor between the signal and ground near KFLOP.  Shielded cables with the shield connected to KFLOP DC ground may also help.
 
#3 - See #2 you are probably picking up noise as in #2.  It is unlikely to see noise on the PC screens as the update rate is very slow.
   
#4 - yes configure limits on the KMotion.exe Config/Flash screen.  We don't currently support soft-limits.  They can be implemented with a KFLOP user program if necessary.  See the SoftLimits3Axis.c example.
 
HTH
TK
 
 
 

Group: DynoMotion Message: 4085 From: soyuzpilot Date: 2/25/2012
Subject: Re: Homing and Mach3 limits
Thanks for the info, I just want to confirm that I understand a few things:

#2) So I should drive JP7 pin 10 high with a pull-up resistor connected to a 3.3v+ source, such as JP7 pin 1 and not a 5v+ source?


#1 & 4) So if I remove all references to home switches and soft limits in Mach3 then am I correct that Mach3 will not ever properly do table-display? Will I need to custom configure a soft limits button to a custom notification in order to turn a KFLop Soft-limits program on and off or will the plugin automatically send appropriate notifications when the default soft limits button is pushed?


--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Shawn,
>  
> Basically all real-time activities (Step Generation, Homing, Limits, etc..) are handled by KFLOP and are configured within KFLOP.  It is best to get everything working in KMotion.exe/KFLOP before even trying to run Mach3 or KMotionCNC.
>  
> Regarding:
>  
> #1 - Yes HomeMach3 is just an empty shell to verify Mach3 is properly sending messages.   If Home input switches are configured within Mach3 then it doesn't send Home messages to the Plugin for some reason.  Remove/disable those and see if you get the messages.
>  
> #2 - The KFLOP inputs are LVTTL 3.3V inputs which are diode clamped to the 3.3V rail.  The protection diodes prevent the input from going above ~ 3.9V.  Some of the inputs are designated +5V  tolerant and have a series resistor to prevent damage if switched to +5V.  But this should be avoided if possible.  Most +5V TTL outputs are only required to go above 2.8V and rarely drive above 3.9V.  So hard switching the inputs directly to +5V should be avoided if possible.  It would be better to use the 1Kohm as a pull up and use the switch to drive the signal low.  The polarity of the signal can be set in software to be either active high or low so that doesn't matter.
>  
> Noise is often a problem on home and limit inputs.  KFLOP inputs are very fast (sub-microsecond) and KFLOP monitors them thousands of times per second so tiny noise pulses picked up from long cables can be a problem.  The best solution is usually to add a 0.1uF ceramic capacitor between the signal and ground near KFLOP.  Shielded cables with the shield connected to KFLOP DC ground may also help.
>  
> #3 - See #2 you are probably picking up noise as in #2.  It is unlikely to see noise on the PC screens as the update rate is very slow.
>    
> #4 - yes configure limits on the KMotion.exe Config/Flash screen.  We don't currently support soft-limits.  They can be implemented with a KFLOP user program if necessary.  See the SoftLimits3Axis.c example.
>  
> HTH
> TK
>  
>  
>  
>
> From: soyuzpilot <shawn@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, February 24, 2012 6:12 PM
> Subject: [DynoMotion] Homing and Mach3 limits
>
>
>  
> I'm trying to configure homing switches and soft limits in Mach3 with my KFLop board and while I've found bits and pieces of information I can't find a definitive post that describes how the KFlop interacts with Mach3 in this regard. Here is what I've tried and the results I'm getting:
>
> 1) I've configured the "Home Program" in the Mach3 Plugin config to be HomeMach3.c which appears to just be an empty shell. It contains a printf statement at the beginning that is supposed to display the parameters that were passed however when I press "Ref All Home" in Mach3 I don't ever see that printed to the console. So I'm not sure if I'm missing something there or not.
>
> 2) I've configured I/O bit 3 (JP7, pin 10) to the board's 5V supply via an NC switch to drive it high. When the switch is opened a 1K pull down resistor connected to the board's digital ground drives it low. I've configured port 1, pin3 as the Home switch in Mach3 with Low as Active and can watch the bit being toggled in the Mach3 diagnostics screen.
>
> 3) I've configured the axis with positive limit monitoring, stop when low, bit 3, and do not allow motor to drive into switch. When I jog the axis in the negative motion (away from the switch) everything is fine. When I jog in the positive motion (towards the switch) it frequently stops and Mach3 goes into reset mode with the alert message that the Y axis as been disabled. When I reset it will behave the same way again (unrestricted negative movement, random stops with positive movement.) The diagnostics panel does not show the bit blinking low at all during this. Sometimes I can move it an inch or more, sometimes only a few thousandths before it resets again. I have tried exchanging the 1K pulldown resistor for a 3.3k resistor to no effect. I don't know if the problem is the TTL is unstable or something else. If it is likely the TTL, would driving it high with a pull-up and then using the switches to sink to ground be a better solution? My knowledge of
> TTL circuit design is extremely limited so I really don't know what is standard practice, I'm sort of making it up as I go along.
>
> 4) I have tried configuring my Mach3 softlimits but it does not seem to be enabled, despite the green icon on the main screen showing softlimits enabled. Choosing table view does not show a red table extents rectangle. Do these soft limits only work once I have successfully configured the KFlop's homing program? Does the KFLOP have it's own soft limits that I should configure?
>
> My end goal is to have the NC switches in series connected to a single bit on the KFLOP to act as homing for all 3 axis and then use soft limits to keep the table within the extents. However I simply am not clear which tasks I should be looking to configure directly on the KFLOP and which tasks Mach3 will handle. Nor which aspects of Mach3 the KFLOP plugin has rendered moot or silently altered. This seems like such a basic and common task, I am at a loss as to why I've had such difficulty finding specific information on how to make it work. Can someone please clue me in or point me in a direction where I might obtain one?
>
Group: DynoMotion Message: 4086 From: soyuzpilot Date: 2/25/2012
Subject: Re: Homing and Mach3 limits
Would it be better to connect the limit switches to a 3.3v I/O like 44 or 45 rather than a 5V tolerant like IO3? I don't fully understand if the resistor on the 5v tolerant inputs makes them more or less prone to noise interference.



--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Shawn,
>  
> Basically all real-time activities (Step Generation, Homing, Limits, etc..) are handled by KFLOP and are configured within KFLOP.  It is best to get everything working in KMotion.exe/KFLOP before even trying to run Mach3 or KMotionCNC.
>  
> Regarding:
>  
> #1 - Yes HomeMach3 is just an empty shell to verify Mach3 is properly sending messages.   If Home input switches are configured within Mach3 then it doesn't send Home messages to the Plugin for some reason.  Remove/disable those and see if you get the messages.
>  
> #2 - The KFLOP inputs are LVTTL 3.3V inputs which are diode clamped to the 3.3V rail.  The protection diodes prevent the input from going above ~ 3.9V.  Some of the inputs are designated +5V  tolerant and have a series resistor to prevent damage if switched to +5V.  But this should be avoided if possible.  Most +5V TTL outputs are only required to go above 2.8V and rarely drive above 3.9V.  So hard switching the inputs directly to +5V should be avoided if possible.  It would be better to use the 1Kohm as a pull up and use the switch to drive the signal low.  The polarity of the signal can be set in software to be either active high or low so that doesn't matter.
>  
> Noise is often a problem on home and limit inputs.  KFLOP inputs are very fast (sub-microsecond) and KFLOP monitors them thousands of times per second so tiny noise pulses picked up from long cables can be a problem.  The best solution is usually to add a 0.1uF ceramic capacitor between the signal and ground near KFLOP.  Shielded cables with the shield connected to KFLOP DC ground may also help.
>  
> #3 - See #2 you are probably picking up noise as in #2.  It is unlikely to see noise on the PC screens as the update rate is very slow.
>    
> #4 - yes configure limits on the KMotion.exe Config/Flash screen.  We don't currently support soft-limits.  They can be implemented with a KFLOP user program if necessary.  See the SoftLimits3Axis.c example.
>  
> HTH
> TK
>  
>  
>  
>
> From: soyuzpilot <shawn@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, February 24, 2012 6:12 PM
> Subject: [DynoMotion] Homing and Mach3 limits
>
>
>  
> I'm trying to configure homing switches and soft limits in Mach3 with my KFLop board and while I've found bits and pieces of information I can't find a definitive post that describes how the KFlop interacts with Mach3 in this regard. Here is what I've tried and the results I'm getting:
>
> 1) I've configured the "Home Program" in the Mach3 Plugin config to be HomeMach3.c which appears to just be an empty shell. It contains a printf statement at the beginning that is supposed to display the parameters that were passed however when I press "Ref All Home" in Mach3 I don't ever see that printed to the console. So I'm not sure if I'm missing something there or not.
>
> 2) I've configured I/O bit 3 (JP7, pin 10) to the board's 5V supply via an NC switch to drive it high. When the switch is opened a 1K pull down resistor connected to the board's digital ground drives it low. I've configured port 1, pin3 as the Home switch in Mach3 with Low as Active and can watch the bit being toggled in the Mach3 diagnostics screen.
>
> 3) I've configured the axis with positive limit monitoring, stop when low, bit 3, and do not allow motor to drive into switch. When I jog the axis in the negative motion (away from the switch) everything is fine. When I jog in the positive motion (towards the switch) it frequently stops and Mach3 goes into reset mode with the alert message that the Y axis as been disabled. When I reset it will behave the same way again (unrestricted negative movement, random stops with positive movement.) The diagnostics panel does not show the bit blinking low at all during this. Sometimes I can move it an inch or more, sometimes only a few thousandths before it resets again. I have tried exchanging the 1K pulldown resistor for a 3.3k resistor to no effect. I don't know if the problem is the TTL is unstable or something else. If it is likely the TTL, would driving it high with a pull-up and then using the switches to sink to ground be a better solution? My knowledge of
> TTL circuit design is extremely limited so I really don't know what is standard practice, I'm sort of making it up as I go along.
>
> 4) I have tried configuring my Mach3 softlimits but it does not seem to be enabled, despite the green icon on the main screen showing softlimits enabled. Choosing table view does not show a red table extents rectangle. Do these soft limits only work once I have successfully configured the KFlop's homing program? Does the KFLOP have it's own soft limits that I should configure?
>
> My end goal is to have the NC switches in series connected to a single bit on the KFLOP to act as homing for all 3 axis and then use soft limits to keep the table within the extents. However I simply am not clear which tasks I should be looking to configure directly on the KFLOP and which tasks Mach3 will handle. Nor which aspects of Mach3 the KFLOP plugin has rendered moot or silently altered. This seems like such a basic and common task, I am at a loss as to why I've had such difficulty finding specific information on how to make it work. Can someone please clue me in or point me in a direction where I might obtain one?
>
Group: DynoMotion Message: 4087 From: Tom Kerekes Date: 2/25/2012
Subject: Re: Homing and Mach3 limits
Hi Shawn,
 
I would recommend the 3.3V source, although pulling up to +5V through a 1K would not be a big problem as compared to a dead short.
 
You might consider something stiffer that a 1K.   1K will only draw 3.3ma through your switch.  Maybe 330ohms for 10ma.
 
Hmmm I never realized that affected the display.  But it looks like the soft limits still are shown on the display even though they won't do anything.  All you really need to do is disable the Home inputs in the Ports&Pins to get Mach3 to send the plugin messages. 
 
No there is no automatic support for turning your soft limit program on and off.  You could use a virtual IO bit to control it.
 
Regards
TK

Group: DynoMotion Message: 4088 From: Tom Kerekes Date: 2/25/2012
Subject: Re: Homing and Mach3 limits
Hi Shawn,
 
The resistance to make the inputs +5V tolerant is only 47ohms so it will have a negligible effect.
 
Regards
TK

Group: DynoMotion Message: 4094 From: soyuzpilot Date: 2/26/2012
Subject: Re: Homing and Mach3 limits
I'm still struggling with getting the KFLOP driven reliably low. I've gone as far to simply directly jumper I/O to the digital ground bar and, while it MOSTLY works, it will still trigger a "active on high" reset one out of every 3 jogs of the full limits of the Y-axis. This is with no switches or any other circuitry involved, just a 6" jumper wire. Any suggestions?

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Shawn,
>  
> Basically all real-time activities (Step Generation, Homing, Limits, etc..) are handled by KFLOP and are configured within KFLOP.  It is best to get everything working in KMotion.exe/KFLOP before even trying to run Mach3 or KMotionCNC.
>  
> Regarding:
>  
> #1 - Yes HomeMach3 is just an empty shell to verify Mach3 is properly sending messages.   If Home input switches are configured within Mach3 then it doesn't send Home messages to the Plugin for some reason.  Remove/disable those and see if you get the messages.
>  
> #2 - The KFLOP inputs are LVTTL 3.3V inputs which are diode clamped to the 3.3V rail.  The protection diodes prevent the input from going above ~ 3.9V.  Some of the inputs are designated +5V  tolerant and have a series resistor to prevent damage if switched to +5V.  But this should be avoided if possible.  Most +5V TTL outputs are only required to go above 2.8V and rarely drive above 3.9V.  So hard switching the inputs directly to +5V should be avoided if possible.  It would be better to use the 1Kohm as a pull up and use the switch to drive the signal low.  The polarity of the signal can be set in software to be either active high or low so that doesn't matter.
>  
> Noise is often a problem on home and limit inputs.  KFLOP inputs are very fast (sub-microsecond) and KFLOP monitors them thousands of times per second so tiny noise pulses picked up from long cables can be a problem.  The best solution is usually to add a 0.1uF ceramic capacitor between the signal and ground near KFLOP.  Shielded cables with the shield connected to KFLOP DC ground may also help.
>  
> #3 - See #2 you are probably picking up noise as in #2.  It is unlikely to see noise on the PC screens as the update rate is very slow.
>    
> #4 - yes configure limits on the KMotion.exe Config/Flash screen.  We don't currently support soft-limits.  They can be implemented with a KFLOP user program if necessary.  See the SoftLimits3Axis.c example.
>  
> HTH
> TK
>  
>  
>  
>
> From: soyuzpilot <shawn@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, February 24, 2012 6:12 PM
> Subject: [DynoMotion] Homing and Mach3 limits
>
>
>  
> I'm trying to configure homing switches and soft limits in Mach3 with my KFLop board and while I've found bits and pieces of information I can't find a definitive post that describes how the KFlop interacts with Mach3 in this regard. Here is what I've tried and the results I'm getting:
>
> 1) I've configured the "Home Program" in the Mach3 Plugin config to be HomeMach3.c which appears to just be an empty shell. It contains a printf statement at the beginning that is supposed to display the parameters that were passed however when I press "Ref All Home" in Mach3 I don't ever see that printed to the console. So I'm not sure if I'm missing something there or not.
>
> 2) I've configured I/O bit 3 (JP7, pin 10) to the board's 5V supply via an NC switch to drive it high. When the switch is opened a 1K pull down resistor connected to the board's digital ground drives it low. I've configured port 1, pin3 as the Home switch in Mach3 with Low as Active and can watch the bit being toggled in the Mach3 diagnostics screen.
>
> 3) I've configured the axis with positive limit monitoring, stop when low, bit 3, and do not allow motor to drive into switch. When I jog the axis in the negative motion (away from the switch) everything is fine. When I jog in the positive motion (towards the switch) it frequently stops and Mach3 goes into reset mode with the alert message that the Y axis as been disabled. When I reset it will behave the same way again (unrestricted negative movement, random stops with positive movement.) The diagnostics panel does not show the bit blinking low at all during this. Sometimes I can move it an inch or more, sometimes only a few thousandths before it resets again. I have tried exchanging the 1K pulldown resistor for a 3.3k resistor to no effect. I don't know if the problem is the TTL is unstable or something else. If it is likely the TTL, would driving it high with a pull-up and then using the switches to sink to ground be a better solution? My knowledge of
> TTL circuit design is extremely limited so I really don't know what is standard practice, I'm sort of making it up as I go along.
>
> 4) I have tried configuring my Mach3 softlimits but it does not seem to be enabled, despite the green icon on the main screen showing softlimits enabled. Choosing table view does not show a red table extents rectangle. Do these soft limits only work once I have successfully configured the KFlop's homing program? Does the KFLOP have it's own soft limits that I should configure?
>
> My end goal is to have the NC switches in series connected to a single bit on the KFLOP to act as homing for all 3 axis and then use soft limits to keep the table within the extents. However I simply am not clear which tasks I should be looking to configure directly on the KFLOP and which tasks Mach3 will handle. Nor which aspects of Mach3 the KFLOP plugin has rendered moot or silently altered. This seems like such a basic and common task, I am at a loss as to why I've had such difficulty finding specific information on how to make it work. Can someone please clue me in or point me in a direction where I might obtain one?
>
Group: DynoMotion Message: 4096 From: Tom Kerekes Date: 2/26/2012
Subject: Re: Homing and Mach3 limits
Hi Shawn,
 
That sounds strange.  Maybe you could describe the topology of your grounding and system.  Do yu have a scope?  What do you mean by "digital ground bar"?  How far is it from KFLOP?  What ground currents are flowing through this connection between it and KFLOP?
 
What message is being printed on the Console Screen?
 
 
What happens if you run a test program such as:
 
for (;;)  // loop
{
    if (ReadBit(xx)
   {
       printf("Saw it high\n");
       Delay_sec(1);
   }
}
 
Does it see the signal high also?
 
Regards
TK

Group: DynoMotion Message: 4097 From: soyuzpilot Date: 2/26/2012
Subject: Re: Homing and Mach3 limits
I noticed in another thread where you said that the I/O on JP6 and JP4 have internal pull-down resistors. I moved the switch over between pin 3 and pin 6 to drive it high when closed and then added a 0.1uF cap between pin 6 and pin 8. Everything seems to be working fine now. Next step will be adding switches for the other two axis and see if the noise stays under control.


--- In DynoMotion@yahoogroups.com, "soyuzpilot" <shawn@...> wrote:
>
> I'm still struggling with getting the KFLOP driven reliably low. I've gone as far to simply directly jumper I/O to the digital ground bar and, while it MOSTLY works, it will still trigger a "active on high" reset one out of every 3 jogs of the full limits of the Y-axis. This is with no switches or any other circuitry involved, just a 6" jumper wire. Any suggestions?
>
> -
Group: DynoMotion Message: 4098 From: soyuzpilot Date: 2/26/2012
Subject: Re: Homing and Mach3 limits
I've got a phoenix powder distribution block that I'm using as a digital ground bar. I've got a couple of output pins going to 5V relays for controlling fluid, enable motors, etc and they sink to this. There is probably 6-8" of 18ga wire connecting them to pin 25 on a breakout block and then 6-8" of ribbon cable connecting the breakout board to the KFLOP's JP7.

I will try setting up that program below and see what it sees. Unfortunately I don't have a scope. Have you had any experience with those cheap little USB "scopes"? Would they have a sampling rate capable of providing useful information, or just a waste of money?







--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Shawn,
>  
> That sounds strange.  Maybe you could describe the topology of your grounding and system.  Do yu have a scope?  What do you mean by "digital ground bar"?  How far is it from KFLOP?  What ground currents are flowing through this connection between it and KFLOP?
>  
> What message is being printed on the Console Screen?
>  
>  
> What happens if you run a test program such as:
>  
> for (;;)  // loop
> {
>     if (ReadBit(xx)
>    {
>        printf("Saw it high\n");
>        Delay_sec(1);
>    }
> }
>  
> Does it see the signal high also?
>  
> Regards
> TK
>
> From: soyuzpilot <shawn@...>
> To: DynoMotion@yahoogroups.com
> Sent: Sunday, February 26, 2012 9:07 AM
> Subject: [DynoMotion] Re: Homing and Mach3 limits
>
>
>  
> I'm still struggling with getting the KFLOP driven reliably low. I've gone as far to simply directly jumper I/O to the digital ground bar and, while it MOSTLY works, it will still trigger a "active on high" reset one out of every 3 jogs of the full limits of the Y-axis. This is with no switches or any other circuitry involved, just a 6" jumper wire. Any suggestions?
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Shawn,
> >  
> > Basically all real-time activities (Step Generation, Homing, Limits, etc..) are handled by KFLOP and are configured within KFLOP.  It is best to get everything working in KMotion.exe/KFLOP before even trying to run Mach3 or KMotionCNC.
> >  
> > Regarding:
> >  
> > #1 - Yes HomeMach3 is just an empty shell to verify Mach3 is properly sending messages.   If Home input switches are configured within Mach3 then it doesn't send Home messages to the Plugin for some reason.  Remove/disable those and see if you get the messages.
> >  
> > #2 - The KFLOP inputs are LVTTL 3.3V inputs which are diode clamped to the 3.3V rail.  The protection diodes prevent the input from going above ~ 3.9V.  Some of the inputs are designated +5V  tolerant and have a series resistor to prevent damage if switched to +5V.  But this should be avoided if possible.  Most +5V TTL outputs are only required to go above 2.8V and rarely drive above 3.9V.  So hard switching the inputs directly to +5V should be avoided if possible.  It would be better to use the 1Kohm as a pull up and use the switch to drive the signal low.  The polarity of the signal can be set in software to be either active high or low so that doesn't matter.
> >  
> > Noise is often a problem on home and limit inputs.  KFLOP inputs are very fast (sub-microsecond) and KFLOP monitors them thousands of times per second so tiny noise pulses picked up from long cables can be a problem.  The best solution is usually to add a 0.1uF ceramic capacitor between the signal and ground near KFLOP.  Shielded cables with the shield connected to KFLOP DC ground may also help.
> >  
> > #3 - See #2 you are probably picking up noise as in #2.  It is unlikely to see noise on the PC screens as the update rate is very slow.
> >    
> > #4 - yes configure limits on the KMotion.exe Config/Flash screen.  We don't currently support soft-limits.  They can be implemented with a KFLOP user program if necessary.  See the SoftLimits3Axis.c example.
> >  
> > HTH
> > TK
> >  
> >  
> >  
> >
> > From: soyuzpilot <shawn@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Friday, February 24, 2012 6:12 PM
> > Subject: [DynoMotion] Homing and Mach3 limits
> >
> >
> >  
> > I'm trying to configure homing switches and soft limits in Mach3 with my KFLop board and while I've found bits and pieces of information I can't find a definitive post that describes how the KFlop interacts with Mach3 in this regard. Here is what I've tried and the results I'm getting:
> >
> > 1) I've configured the "Home Program" in the Mach3 Plugin config to be HomeMach3.c which appears to just be an empty shell. It contains a printf statement at the beginning that is supposed to display the parameters that were passed however when I press "Ref All Home" in Mach3 I don't ever see that printed to the console. So I'm not sure if I'm missing something there or not.
> >
> > 2) I've configured I/O bit 3 (JP7, pin 10) to the board's 5V supply via an NC switch to drive it high. When the switch is opened a 1K pull down resistor connected to the board's digital ground drives it low. I've configured port 1, pin3 as the Home switch in Mach3 with Low as Active and can watch the bit being toggled in the Mach3 diagnostics screen.
> >
> > 3) I've configured the axis with positive limit monitoring, stop when low, bit 3, and do not allow motor to drive into switch. When I jog the axis in the negative motion (away from the switch) everything is fine. When I jog in the positive motion (towards the switch) it frequently stops and Mach3 goes into reset mode with the alert message that the Y axis as been disabled. When I reset it will behave the same way again (unrestricted negative movement, random stops with positive movement.) The diagnostics panel does not show the bit blinking low at all during this. Sometimes I can move it an inch or more, sometimes only a few thousandths before it resets again. I have tried exchanging the 1K pulldown resistor for a 3.3k resistor to no effect. I don't know if the problem is the TTL is unstable or something else. If it is likely the TTL, would driving it high with a pull-up and then using the switches to sink to ground be a better solution? My knowledge of
> > TTL circuit design is extremely limited so I really don't know what is standard practice, I'm sort of making it up as I go along.
> >
> > 4) I have tried configuring my Mach3 softlimits but it does not seem to be enabled, despite the green icon on the main screen showing softlimits enabled. Choosing table view does not show a red table extents rectangle. Do these soft limits only work once I have successfully configured the KFlop's homing program? Does the KFLOP have it's own soft limits that I should configure?
> >
> > My end goal is to have the NC switches in series connected to a single bit on the KFLOP to act as homing for all 3 axis and then use soft limits to keep the table within the extents. However I simply am not clear which tasks I should be looking to configure directly on the KFLOP and which tasks Mach3 will handle. Nor which aspects of Mach3 the KFLOP plugin has rendered moot or silently altered. This seems like such a basic and common task, I am at a loss as to why I've had such difficulty finding specific information on how to make it work. Can someone please clue me in or point me in a direction where I might obtain one?
> >
>
Group: DynoMotion Message: 4099 From: Tom Kerekes Date: 2/26/2012
Subject: Re: Homing and Mach3 limits
Hi Shawn,
 
It is hard to say from that description.  I don't follow the 5V Relay stuff.
 
No I don't have any experience with those USB Scopes.  The glitches you are looking for may be sub-microsecond.
 
There are a number of experiments you could do to narrow it down such as turning on and off your amplifiers, or moving your ground wire to various points.   I assume you have Stepper motors?
 
Regards
TK

Group: DynoMotion Message: 4105 From: soyuzpilot Date: 2/27/2012
Subject: Re: Homing and Mach3 limits
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:

> #4 - yes configure limits on the KMotion.exe Config/Flash screen.  We don't currently support soft-limits.  They can be implemented with a KFLOP user program if necessary.  See the SoftLimits3Axis.c example.


What is the "proper" way to start/restart a thread like the SoftLImits program via the Initialization program?
Group: DynoMotion Message: 4106 From: himykabibble Date: 2/27/2012
Subject: Re: Homing and Mach3 limits
Things like limits are such low bandwidth, it makes no sense to put them in a separate thread. At the end of your init thread, just put a while(1) loop with a WaitNextTimeSlice() in it to do things like that.

Regards,
Ray L.

--- In DynoMotion@yahoogroups.com, "soyuzpilot" <shawn@...> wrote:
>
>
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
>
> > #4 - yes configure limits on the KMotion.exe Config/Flash screen.  We don't currently support soft-limits.  They can be implemented with a KFLOP user program if necessary.  See the SoftLimits3Axis.c example.
>
>
> What is the "proper" way to start/restart a thread like the SoftLImits program via the Initialization program?
>
Group: DynoMotion Message: 4107 From: Tom Kerekes Date: 2/27/2012
Subject: Re: Homing and Mach3 limits
Hi Shawn,
 
It works out best to just add that loop to the end of your Init.c program.  That way after the Initialization is complete it just continues to run.   If you add a condition of a virtual IO bit such as:
 
if (ReadBit(48)) ....
 
Then you will be able to turn on and off the soft limits from Mach or maybe your home Programs by setting or clearing bit 48.
 
Regards
TK
 

Group: DynoMotion Message: 4137 From: soyuzpilot Date: 2/28/2012
Subject: Re: Homing and Mach3 limits
if I leave the initialization thread running, what happens when Mach3 resets? Does it safely kill the thread and garbage collect memory for it or am I going to have problems with memory leaks, zombie processes, or race conditions?

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Shawn,
>  
> It works out best to just add that loop to the end of your Init.c program.  That way after the Initialization is complete it just continues to run.   If you add a condition of a virtual IO bit such as:
>  
> if (ReadBit(48)) ....
>  
> Then you will be able to turn on and off the soft limits from Mach or maybe your home Programs by setting or clearing bit 48.
>  
> Regards
> TK
>  
>
>
> ________________________________
> From: soyuzpilot <shawn@...>
> To: DynoMotion@yahoogroups.com
> Sent: Monday, February 27, 2012 7:49 AM
> Subject: [DynoMotion] Re: Homing and Mach3 limits
>
>
>  
>
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
>
> > #4 - yes configure limits on the KMotion.exe Config/Flash screen.  We don't currently support soft-limits.  They can be implemented with a KFLOP user program if necessary.  See the SoftLimits3Axis.c example.
>
> What is the "proper" way to start/restart a thread like the SoftLImits program via the Initialization program?
>
Group: DynoMotion Message: 4138 From: Tom Kerekes Date: 2/28/2012
Subject: Re: Homing and Mach3 limits
Hi Shawn,
 
heh heh, it all works.  It kills the thread, re-downloads the program, overwriting the same memory, re-executes it.  Memory for each Thread in KFLOP is fixed.
 
Regards
TK

Group: DynoMotion Message: 4140 From: soyuzpilot Date: 2/29/2012
Subject: Re: Homing and Mach3 limits
Great, thanks. I just want to make sure I've got this thing running properly before I turn it loose.


--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Shawn,
>  
> heh heh, it all works.  It kills the thread, re-downloads the program, overwriting the same memory, re-executes it.  Memory for each Thread in KFLOP is fixed.
>  
> Regards
> TK
>
> From: soyuzpilot <shawn@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tuesday, February 28, 2012 5:25 PM
> Subject: [DynoMotion] Re: Homing and Mach3 limits
>
>
>  
> if I leave the initialization thread running, what happens when Mach3 resets? Does it safely kill the thread and garbage collect memory for it or am I going to have problems with memory leaks, zombie processes, or race conditions?
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Shawn,
> >  
> > It works out best to just add that loop to the end of your Init.c program.  That way after the Initialization is complete it just continues to run.   If you add a condition of a virtual IO bit such as:
> >  
> > if (ReadBit(48)) ....
> >  
> > Then you will be able to turn on and off the soft limits from Mach or maybe your home Programs by setting or clearing bit 48.
> >  
> > Regards
> > TK
> >  
> >
> >
> > ________________________________
> > From: soyuzpilot <shawn@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Monday, February 27, 2012 7:49 AM
> > Subject: [DynoMotion] Re: Homing and Mach3 limits
> >
> >
> >  
> >
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > > #4 - yes configure limits on the KMotion.exe Config/Flash screen.  We don't currently support soft-limits.  They can be implemented with a KFLOP user program if necessary.  See the SoftLimits3Axis.c example.
> >
> > What is the "proper" way to start/restart a thread like the SoftLImits program via the Initialization program?
> >
>